<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!doctype html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>lagou manage</title>
<meta name="description" content="拉勾数据">
<meta name="keywords" content="二手房 房产经济 房企 开发商 拉勾数据 IFS">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="icon" type="image/png" href="assets/i/favicon.png">
<link rel="apple-touch-icon-precomposed"
	href="assets/i/app-icon72x72@2x.png">
<meta name="apple-mobile-web-app-title" content="eosms for IFS" />
<link rel="stylesheet" href="assets/css/amazeui.min.css" />
<link rel="stylesheet" href="assets/css/admin.css">
</head>
<body>
	<!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，Amaze UI 暂不支持。 请 <a href="http://browsehappy.com/" target="_blank">升级浏览器</a>
  以获得更好的体验！</p>
<![endif]-->

	<jsp:include page="/manage_header.do" flush="true" />

	<div class="am-cf admin-main">
		<!-- sidebar start -->
			<jsp:include page="/manage_tree.do" flush="true" ><jsp:param name="user_id" value="${user1.id}"/></jsp:include>
		<!-- sidebar end -->

		<!-- content start -->
		<div class="admin-content">

			<div class="am-cf am-padding">
				<div class="am-fl am-cf">
					<strong class="am-text-primary am-text-lg">企业认证审核</strong> / <small>user</small>
				</div>
			</div>
				<input type="hidden" name="id" id="id" value="${user.id}">
				<input type="hidden" name="page_num" id="page_num" value="0">
				<div class="am-tabs am-margin" data-am-tabs>
					<ul class="am-tabs-nav am-nav am-nav-tabs">
						<li class="am-active"><a href="#tab1">详细信息</a></li>
					</ul>


		<div class="am-tabs-bd" id="tab2">
		<div class="am-tab-panel am-fade am-in am-active" id="tab1" name="${user.business_license_front_url}">
			<table
				class="am-table am-table-striped am-table-hover table-main">
				<tr>
					<td>用户名：${user.name}</td>								
					<td>营业执照号：${user.business_license_num}</td>
					</tr>
				<tr>
				    <td>公司名：${user.name_company}</td>
					<td>公司地址：${user.address_company}</td>
				</tr>
				<tr>
				<td>营业执照正面照：</td>
				<td><img src="${user.business_license_front_url}" alt="images" id="${user.id_card_front_url}"></td>
				</tr>
				
				<tr id="error" name="error">
				<td>错误描述:</td>								
				<td><textarea introduce="${introduce}" id="introduce" ROWs="10" COLs="30">${introduce}</textarea></td>
				</tr>
			</table>                 
		</div>
		 <div class="am-g am-margin-top">	
			<div class="am-margin am-text-center">
			<button type="button" id="changeComTr_button"
				class="am-btn am-btn-primary am-btn-xs">审核通过</button>
			<button type="button" id="changeComFl_button"
				class="am-btn am-btn-primary am-btn-xs">审核未通过</button>
			<button type="button" id="button"
				class="am-btn am-btn-primary am-btn-xs">提交</button>
			</div>
			</div>	
	</div>
		</div>
		</div>
	</div>
	<a href="#" class="am-show-sm-only admin-menu"
		data-am-offcanvas="{target: '#admin-offcanvas'}"> <span
		class="am-icon-btn am-icon-th-list"></span>
	</a>

	<jsp:include page="/manage_foot.do" flush="true" />


	<!--[if (gte IE 9)|!(IE)]><!-->
	<script src="assets/js/jquery.min.js"></script>
	<!--<![endif]-->
	<script src="assets/js/amazeui.min.js"></script>
	<script src="assets/js/app.js"></script>
	<script type="text/javascript">
$(function() {	
	//审核通过按钮点击事件
	
	var a=$("#tab1").attr("name");
	$("#img1").attr("src","/"+a);
	
	$("#error").hide();
	$("#button").hide();
	$("#changeComTr_button").click(function() {
		$.ajax({
			contentType:"application/json",
		    type : "POST",
		    url : "<%=request.getContextPath()%>/change_user_authenticComTr.do?id="+$("#id").val()+"&flag=1"+"",
		    dataType: "json",
		    success : function(data) {
		        if(data.flag==1){
		        	
		            alert("审核通过！");
		        }
		        else{
		            alert("审核失败！");
		        }
		    },
		    error :function(){
		        alert("网络连接出错！");
		    }
		}); 
	});
	
	//审核未通过按钮点击事件
	$("#changeComFl_button").click(function() {
		$("#error").show();
		$("#button").show();
		alert("请输入错误描述！");
	});
	//审核未通过按钮点击事件
	$("#button").click(function() {
		$.ajax({
			contentType:"application/json",
		    type : "POST",
		    url : "<%=request.getContextPath()%>/change_user_authenticComTr.do?id="+$("#id").val()+"&introduce="+$("#introduce").val()+"&flag=0"+"",
		    dataType: "json",
		    success : function(data) {
		        if(data.flag==1){      	
		            alert("审核未通过！");
		        }
		        else{
		            alert("审核失败！");
		        }
		    },
		    error :function(){
		        alert("网络连接出错！");
		    }
		}); 
	});
});
</script>
</body>
</html>